import org.apache.ibatis.session.SqlSession;

import cn.csdd.service.UserService;
import cn.csddxt.entity.Address;
import cn.csddxt.entity.User;
import cn.csddxt.util.MybatisUtile;

public class Test {
	public static void main(String[] args) {
		SqlSession sq = MybatisUtile.mutile.getsqlSession();
		// Provider po = sq.getMapper(ProviderService.class).getProvider(1);
		// System.out.println(po.getId() + "---" + po.getProFax());
		// List<Bill> bi = po.getBillpro();
		// for (Bill bill : bi) {
		// System.out.println(bill.getBillCode() + "---" +
		// bill.getIsPaymentst());
		// }
		User us = sq.getMapper(UserService.class).get(1);
		System.out.println(us.getRole().getCreatedBy() + "us.ge" + us.getRole().getRoleName());
		for (Address string : us.getAddresses()) {
			System.out.println(string.getId() + "--" + string.getContact());
		}
		// sq.getMapper(BillService.class).delbill(19);
		// sq.commit();
	}
}
